/* ===== Page Header ===== */
.page-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0ead1;
  width: 80%;
  margin-left: 2%;
  text-align: right;
}

.page-header h1 {
  color: #2c4b2c;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.page-header p {
  color: #596d52;
  font-size: 14px;
  direction: rtl;
}

/* ===== Financial Statistics ===== */
.financial-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  width: 80%;
  margin-left: 2%;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  border-left: 4px solid #779e63;
  direction: rtl;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 20px;
}

.stat-card.capital {
  border-left-color: #2196f3;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.stat-card.profit {
  border-left-color: #4caf50;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.stat-card.net-profit {
  border-left-color: #2c4b2c;
  background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}

.stat-card.loss {
  border-left-color: #f44336;
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #779e63 0%, #596d52 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  flex-shrink: 0;
}

.stat-card.capital .stat-icon {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.stat-card.profit .stat-icon {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.stat-card.net-profit .stat-icon {
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
}

.stat-card.loss .stat-icon {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.stat-content {
  flex: 1;
  text-align: right;
}

.stat-label {
  color: #596d52;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  color: #2c4b2c;
  font-size: 24px;
  font-weight: 700;
}

/* ===== Charts Section ===== */
.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
  width: 80%;
  margin-left: 2%;
}

.chart-container {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0ead1;
  direction: rtl;
}

.chart-header h3 {
  color: #2c4b2c;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.chart-filter {
  padding: 8px 15px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 13px;
  color: #2c4b2c;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chart-filter:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

/* ===== Report Generator ===== */
.report-generator {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  width: 80%;
  margin-left: 2%;
  margin-bottom: 50px;
  direction: rtl;
}

.section-title {
  color: #2c4b2c;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0ead1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.report-filters {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.filter-group label {
  color: #2c4b2c;
  font-size: 14px;
  font-weight: 600;
}

.filter-group select {
  padding: 12px 15px;
  border: 2px solid #e0ead1;
  border-radius: 8px;
  font-size: 14px;
  color: #2c4b2c;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: #779e63;
  box-shadow: 0 0 0 3px rgba(119, 158, 99, 0.1);
}

.btn-apply {
  padding: 12px 30px;
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-apply:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

.report-preview {
  margin-top: 25px;
  padding: 25px;
  background: #f9efe3;
  border-radius: 8px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header h3 {
  color: #2c4b2c;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.btn-view-pdf {
  padding: 12px 25px;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-view-pdf:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}

/* ===== Toast Notification ===== */
.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2c4b2c 0%, #1e3a1e 100%);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  z-index: 2000;
  transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  bottom: 30px;
}

.toast-icon {
  font-size: 20px;
  color: #a8d08d;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .financial-stats,
  .charts-section,
  .report-generator,
  .page-header {
    width: 75%;
  }

  .financial-stats {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .financial-stats,
  .charts-section,
  .report-generator {
    width: 95%;
    margin-left: 2.5%;
  }

  .page-header {
    width: 95%;
    padding-top: 20px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .charts-section {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 15px;
    width: 99%;
  }

  .report-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  .btn-apply {
    width: 100%;
    justify-content: center;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .financial-stats {
    grid-template-columns: 1fr;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .chart-header h3 {
    font-size: 16px;
  }

  .section-title {
    font-size: 18px;
  }
}
